#include<bits/stdc++.h>
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define debug  freopen("in.txt","r",stdin),freopen("out.txt","w",stdout);
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int maxn = 1e6+10;
using namespace std;

int N;
double p[maxn];
double f[3030][3030];
int main(){
    // debug;
    ios;

    cin>>N;
    for(int i = 1;i<=N;i++) cin>>p[i];
    f[1][1] = p[1]; f[1][0] = 1-p[1];
    for(int i = 2;i<=N;i++){
        for(int j = 0;j<=i;j++){
            if(j == 0) {
                f[i][0] = f[i-1][0] * (1-p[i]);
                continue;
            }
            if (j-1>=0) f[i][j] += f[i-1][j-1] * p[i];
            f[i][j] += f[i-1][j] * (1-p[i]);
        }
    }
    double ans = 0;
    for(int i = 1;i<=N;i++){
        if(i > N-i) ans += f[N][i];
    }
    cout.precision(10);
    cout<<ans<<'\n';

    
    return 0;
}
